import PagesConfig from "./index.ts";

// vite.config.ts 插件
const globalPagesConfigPlugin = async () => {
  const pagesConfig = await PagesConfig();
  return {
    name: "global-pages-plugin",
    config: async () => ({
      define: {
        ROUTES: pagesConfig.ROUTES,
        PAGES: pagesConfig.PAGES,
      },
    }),
  };
};
export default globalPagesConfigPlugin;
